<?php
class admin_logout extends MX_Controller{
	public function index(){
		global $CFG;

		$this->load->library('session');
		$this->load->helper('url');
		$this->load->helper('cookie');
		$url=$CFG->config['base_url'].'admin';
		$this->session->unset_userdata('back_url');
		$this->session->unset_userdata('admin');
		setcookie("admin", 0,0);
		delete_cookie("admin");
		redirect($url);
	}
}